 <script th:inline="javascript">
/*<![CDATA[*/

    function del(event,element){
    	event.preventDefault();
      	bootbox.confirm("确定删除该项吗？", function(result) {
    	if(result){
    		var _id = $(element).attr("href");
    		BOSS.remoteCall('article/category/delete',$('#div_category_grid'),{id:_id});   //cateInfo:'cateInfo'
    		
    	}
    	}); 
    }
	
/*]]>*/
</script>
<table layout:fragment="categorys_table"  class="table table-striped table-bordered  table-advance table-hover" id="category_grid">
	<thead>
		<tr>
			<th>帮助中心分类名称</th>
			<th>描述</th>
			<th>排序</th>
			<th>是否显示</th>
			<th>操作</th>
		</tr>
	</thead>	
	<tbody>
		<tr class="odd gradeX" th:each="data : ${categories}" th:attr="data-tt-id=${data.id},data-tt-parent-id=${data.parent_id}">
			<td >
				 <!-- <span th:text="${data.parent_id}"></span> -->
				<!-- <span th:text="${data.parentCollection}"></span>  -->
				 <a th:href="@{'/article/list/index/'+${data.id}}">
				    <span th:text="${data.name}"> 关于韩都</span>
				 </a>
			</td>
			<td th:text="${data.cat_desc}">
				万维嘉信电子商务有限公司
			</td> 
			 	
			<td th:text="${data.sort_order}">
				 100
			</td>
					
			<td class="center" th:text="${data.is_show}? 是 : 否">
				 是
			</td>
			<td>
			
   
   
				 <a href="" th:href="@{'/article/category/edit/'+${data.id}}"         id="edit_link_${data.id}}" name="edit_link_${data.id}}" class="btn default btn-xs purple" ><i class="fa fa-edit"></i>编辑</a>|
<!-- 	<a href="" th:href="${data.id>0} ? @{'/article/category/edit/'+${data.id}} : @{'/article/category/edit/1'}"         id="edit_link_${data.id}}" name="edit_link_${data.id}}" class="btn default btn-xs purple" ><i class="fa fa-edit"></i>编辑</a>| -->
				 <a href="#" th:href="${data.id}" class="btn default btn-xs purple" id="del_link_${data.id}}" name="del_link_${data.id}}"  onclick="del(event,this);"><i class="fa fa-minus"></i>移除</a>	
			</td>		 
		</tr>
 	</tbody>
</table>

 <script th:inline="javascript">
/*<![CDATA[*/

    $("#category_grid").treetable({ expandable: true });
    $("#category_grid").treetable('expandAll');

/*]]>*/
</script>
